//For this example, set DataType to "int" in listarr.h
#include <iostream>
#include "list.h"
using namespace std;
void main(){
	List samples(100);//Set of samples
	int newSample,//Input sample
	total=0;//Sum of the Input samples
	//Read in a set of samples from the keyboard.
	char c;
	cout<<"Enter list of samples (end with eof):";
	while(cin>>newSample)
		samples.insert(newSample);
	if(!samples.isEmpty())
	{
		samples.gotoBeginning();
		do
		total+=samples.getCursor();
		while(samples.gotoNext());
	}
	cout<<"Sum is "<<total<<endl;
	//cin>>c;
	system("pause");
}